"""OA_django URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from myapp.views import *
urlpatterns = [
    path('admin/', admin.site.urls),
    # 获取图形验证码
    path('imgcode/<str:uuid>/',ImageCodeAPIView.as_view()),
    # 用户登录
    path('user/login/',UserLoginView.as_view()),
    # 登陆日志
    path('login-log/',LoginLogView.as_view()),
    # 用户查询，增加
    path('usermanager/',UserManageAPIView.as_view()),
    # 用户修改，删除
    path('usermanager/<int:id>/',UserManageView.as_view()),
    # 部门查询，增加
    path('depart/',DepartmentAPIView.as_view()),
    # 部门修改，删除
    path('depart/<int:id>/',DepartmentView.as_view()),
    # 岗位查询，增加
    path('posts/',PostsAPIView.as_view()),
    # 岗位修改，删除
    path('posts/<int:id>/',PostsView.as_view()),
    # 职级查询，增加
    path('rank/',RankAPIView.as_view()),
    # 职级修改，删除
    path('rank/<int:id>/',RankView.as_view()),
    # 角色查看，添加
    path('roles/',RoleAPIView.as_view()),
    # 角色修改，删除
    path('roles/<int:id>/',RoleView.as_view()),
    # 权限查看，添加
    path('permission/',PermissionAPIView.as_view()),
    # 权限查看单条，修改，删除
    path('permission/<int:id>/',PermissionView.as_view()),
    # 车辆查询，增加
    path('cars/',CarAPIView.as_view()),
    # 车辆修改，删除
    path('cars/<int:id>/',CarView.as_view())


]
